<template>
  <div>
<van-nav-bar
  :title="name"
  left-text="返回"
  right-text="分享"
  left-arrow
  @click-left="$router.back()"
/>
  </div>
</template>

<script>
import { getMusic } from '@/api/music.js'
export default {
  data () {
    return {
      name: ''
    }
  },

  created () {
    this.getMusic()
  },

  methods: {
    async getMusic () {
      const res = await getMusic(this.$route.params.id)
      console.log(res)
      this.name = res.data.songs[0].name
    }
  }
}
</script>

<style scoped lang='less'>

</style>
